package com.yuba.front.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuba.common.mybatis.core.page.PageQuery;
import com.yuba.common.mybatis.core.page.TableDataInfo;
import com.yuba.front.domain.LikePosts;
import com.yuba.front.domain.bo.LikePostsBo;
import com.yuba.front.domain.vo.LikePostsVo;

import java.util.List;

public interface ILikePostsService extends IService<LikePosts> {

    LikePostsVo queryById(Long likeId);

    TableDataInfo<LikePostsVo> queryPageList(LikePostsBo bo, PageQuery pageQuery);

    /**
     * 点赞帖子
     * @param postsId 帖子id
     * @param userId 用户id
     */
    void likePosts(Long postsId, Long userId,  Long acceptUserId);

    /**
     * 取消点赞帖子
     * @param postsId 帖子id
     * @param userId 用户id
     */
    void unlikePosts(Long postsId,Long acceptUserId, Long userId);

    /**
     * 删除点赞
     * @param ids 点赞id
     * @param isValid 是否有效
     * @return
     */
    Boolean deleteWithValidByIds(List<Long> ids, boolean isValid);
}
